package cn.tedu._05mvcboot03.base.config;


import cn.tedu._05mvcboot03.base.interceptors.LoginCheckInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author Justin Parker
 * @Date 2024/8/14 0014 14:16
 * @Version 1.0
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new MyInterceptor());

//        registry.addInterceptor(new MyInterceptor()).addPathPatterns("/v1/weibo/**");
//        registry.addInterceptor(new MyInterceptor()).addPathPatterns("/v1/comment/**").excludePathPatterns("/v1/comment/selectByWeiboId");
            registry.addInterceptor(new LoginCheckInterceptor()).addPathPatterns("/v1/users/acticle");
    }


}
